Crate cranelift_control
source ·Expand description
Cranelift Control
This is the home of the control plane of chaos mode, a compilation feature intended to be turned on for certain fuzz targets. When the feature is turned off, as is normally the case, ControlPlane will be a zero-sized type and optimized away.
While the feature is turned on, the struct ControlPlane provides functionality to tap into pseudo-randomness at specific locations in the code. It may be used for targeted fuzzing of compiler internals, e.g. manipulate heuristic optimizations, clobber undefined register bits etc.
There are two ways to acquire a ControlPlane:
Structs
- A shim for ControlPlane when chaos mode is disabled. Please see the crate-level documentation.